<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<script>

const json = {
    a: { b:{ c:1 } },
    d: [1,2]
}

const dfs = (n,path) => {
    console.log(n,path)
    Object.keys(n).forEach(k => {
        dfs(n[k], path.concat(k))
    })
}

dfs(json, [])

console.log(typeof null)

</script>
</body>
</html>